#pragma once

#include "znx_defs.h"
#include "znx_array.h"
#include "znx_thread_base.h"

static inline void
znx_file_close_handle(void *data)
{
    FILE *file = (FILE *)data;
    fclose(file);
}


static inline void
znx_fd_close_handle(void *data)
{
    znx_syscall_close((int)(intptr_t)data);
}


static inline void
znx_thread_free_handle(void *data)
{
    znx_thread_free(data);
}


static inline void
znx_array_destroy_handle(void *data)
{
    znx_array_destroy((znx_array_t *)data);
}
